# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=colord-gtk
pkgver=0.1.26+5+ga9d9c91
pkgrel=1
pkgdesc="Additional GTK support code for colord"
arch=(i686 x86_64)
url="https://www.freedesktop.org/software/colord/"
license=(GPL2)
depends=(lcms2 gtk3 colord)
makedepends=(intltool gobject-introspection vala gtk-doc git
             docbook-utils docbook-sgml perl-sgmls)
_commit=a9d9c91cdbe7866d15ba3e01dff03bcfe0b352c6  # master
source=("git+https://github.com/hughsie/colord-gtk#commit=$_commit")
sha1sums=('SKIP')
validpgpkeys=('163EB50119225DB3DF8F49EA17ACBA8DFA970E17')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^COLORD_GTK_//;s/_/./g;s/-/+/g'
}

prepare() {
  # Fixup docbook-utils/perl-sgmls, for now...
  mkdir path
  ln -s /usr/bin/vendor_perl/sgmlspl.pl path/sgmlspl

  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd "$pkgname"
  ./configure --prefix=/usr \
    --sysconfdir=/etc --libexecdir=/usr/lib/colord \
    --localstatedir=/var --disable-static --enable-vala \
    --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  PATH="$srcdir/path:$PATH" make
}

package() {
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
